package com.geeke.sys.entity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.geeke.common.persistence.DataEntity;
import com.geeke.org.entity.Company;
import java.util.*;

/**
 * 岗位表Entity
 * 
 * ⚠️ 重要说明：
 *   如果表中包含`name`或`remarks`字段，必须在实体类中显式定义`name`或`remarks`属性。
 *   这些字段的属性已经包含在基类中，无需在实体类定义：`id`, `createBy`, `createDate`, `updateBy`, `updateDate`, `delFlag`, `parent`, `ids`, `sort`
 */
public class Post extends DataEntity<Post> {

    private static final long serialVersionUID = 1L;
    
    public Post() {
        super();
    }
    
    public Post(String id) {
        super(id);
    }

    // 公司
    private Company company = new Company();
    public Company getCompany() {
        return company;
    }
    public void setCompany(Company company) {
        this.company = company;
    }

    // 岗位名称
    @Length(min=1, max=100, message="岗位名称长度必须介于1和100之间")
    @NotBlank(message="岗位名称不能为空")
    private String name;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    // 岗位编码
    @Length(min=1, max=100, message="岗位编码长度必须介于1和100之间")
    @NotBlank(message="岗位编码不能为空")
    private String code;
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }

    // 备注信息
    @Length(min=0, max=255, message="备注信息长度必须介于0和255之间")
    private String remarks;
    public String getRemarks() {
        return remarks;
    }
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Override
    public String getTableAlias() {
        return "post";
    }
    
} 